package com.xyzh.stj.web.dao;

import com.xyzh.stj.web.dto.right.QueryRightDTO;
import com.xyzh.stj.web.entity.RightEntity;
import com.xyzh.stj.web.entity.RoleEntity;
import com.xyzh.application.base.dao.BasicMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 权限表 Mapper 接口
 * </p>
 *
 * @author @JZB
 * @since 2023-10-29
 */
public interface RightMapper extends BasicMapper<RightEntity> {

    List<RightEntity> getRightsByRoles(@Param("roles") List<RoleEntity> roles);

    List<RightEntity> queryRightByRoles(@Param("roles") List<RoleEntity> roles, @Param("query")QueryRightDTO queryRightDTO);

    List<RightEntity> getRightsByRoleid(@Param("roleid") String roleid);

    List<RightEntity> getRightsByOrgs(@Param("orgs") List<String> orgs);

    List<RightEntity> queryRightsByOrgs(@Param("orgs") List<String> orgs, @Param("query")QueryRightDTO queryRightDTO);

    List<RightEntity> getRightsByOrgid(@Param("orgid") String orgid);

    int selectSortKey();

}
